package com.feituan.manager.controller;


import com.feituan.core.persistence.service.IIntegrationUserService;
import com.feituan.core.pojo.response.IntegrationUserRes;
import com.feituan.core.pojo.response.Response;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/integrationUser")
public class IntegrationUserController {


    @Resource
    private IIntegrationUserService integrationUserService;

    /**
     * 查询用户积分来源明细
     * @param userId userId
     * @return
     */
    @PostMapping("/getInfo")
    public Response<List<IntegrationUserRes>> selectIntegrationByUserId(Long userId) {
        return Response.success(integrationUserService.selectIntegrationByUserId(userId));
    }
}
